package com.tree.zk.autoconfig;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import javax.validation.constraints.NotNull;

/**
 * package com.tree.zk.autoconfig
 * description:
 *
 * @author tree
 * @date 2019-08-22 10:11
 */
@ConfigurationProperties(prefix = "zookeeper")
@Data
public class ZookeeperProperties {

    @NotNull(message = "zookeeper服务地址不能为空")
    private String serverUrl;
    @NotNull(message = "namespace不能为空")
    private String namespace;
    private String digest;
    private Integer sessionTimeoutMs = 60000;
    private Integer connectionTimeoutMs = 6000;
    private Integer maxRetries = 3;
    private Integer baseSleepTimeMs = 1000;
}
